#pragma once
#include "mygamewindow.h"
#include "Sprite.h"
#include "string"
using namespace std;

class CMyGameProcessBar :public CMyGameWindow
{
protected:
	CSprite m_sprBack;
	CSprite m_sprFrame;
	CSprite m_sprFill;
	string m_strShowText;
	float m_fPercent;
	UINT m_nLastTime;
public:
	CMyGameProcessBar(void);
	~CMyGameProcessBar(void);

	void LoadRes(string strBackFileName,string strFrameFileName,string strFillFileName);
	void Update();
	void Draw(HDC hDC);

	float GetPercent() {return m_fPercent;};
	void SetPercent(float fPercent)
	{
		if (fPercent < 0.0f)
		{
			fPercent = 0.0f;
		}
		if (fPercent > 1.0f)
		{
			fPercent = 1.0f;
		}
		m_fPercent = fPercent;
	}
};
